<!DOCTYPE html>
<html>
<head>
<title>Daftar Produk</title>
<link href="View/bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="View/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
<link  href="View/bootstrap/js/bootstrap.min.js" rel="stylesheet"/>
<script type="text/javascript" src="View/bootstrap/js/jquery-latest.js"></script>
</head>
<?php
session_start();
if (!isset($_SESSION["id_user"])){
	include '/content/content_header_guest.php';
} else {
	include '/content/content_header_user.php';
}
?>
<body>
<?php
   $conn =mysql_connect("127.0.0.1","root","");
   $db = mysql_select_db("pronsweb",$conn);
   $sql = "select * from produk";
   $hasil = mysql_query($sql,$conn);
?>
        <div class="container-fluid">
                <div class="row-fluid">
                        <div class="span9">
                                <pre><h3><center>Daftar Produk</h3></center></pre>
								<a href="form_produk.php" class="pull-right" >+Tambah</a>
                                        <table>
                                                <center><table class="table table-striped" align=center cellspacing=10 cellpadding=10></center>
                                                <center><th width="128">TOKO</th></center>
                                                <center><th width="200">NAMA PRODUK</th></center>
                                                <center><th width="160">DESKRIPSI PRODUK</th></center>
												<center><th width="170">JUMLAH ITEM</th></center>
                                                <center><th width="128">HARGA</th></center>
                                                <center><th width="128">DISKON</th></center>
                                                <center><th width="128">ACTION</th></center>
        </tr>
<?php
   while ($rsuser = mysql_fetch_row($hasil)){
?>
   <tr>
      <td><?php echo $rsuser[1]; ?></td>
      <td><?php echo $rsuser[3]; ?></td>
      <td><?php echo $rsuser[4]; ?></td>
	  <td><?php echo $rsuser[5]; ?></td>
      <td><?php echo $rsuser[6]; ?></td>
      <td><?php echo $rsuser[7]; ?></td>
	 
          <td><a href=form_edit_produk.php?id=<?php echo $rsuser[0]; ?>>Edit</a> |
                  <a href=hapusproduk.php?id=<?php echo $rsuser[0]; ?> onClick="return confirm('Apakah Anda benar-benar akan menghapus <?php echo $rsuser[0];?>?')">Hapus</a></td>
   </tr>
<?php } ?>
</table>
</div>
<div class="span3">
<?php 
																	include '/content/content_mini_list_produk.php';
																?>
                                                                <?php
                                                                        include 'content/content_banner.php';
                                                                ?>
                                                </div>
                                                        </div>
                                                                </div>
                                                                        <br>
                                                                        <br>    
                                                                <?php
                                                                        include 'content/content_footer_site_map.php';
                                                                        include 'content/content_footer.php';
                                                                ?>

